// 导入路由
import VueRouter from "vue-router"

// 注册
import Vue from 'vue'
Vue.use(VueRouter)

// 实例化
const router = new VueRouter({
  // 路由配制
  routes: [
    {
      path: "/",
      name: 'homePage',
      component: resolve => require(['@/view/HomePage.vue'], resolve),
    },
    {
      path: "/HomePage",
      name: 'HomePage',
      component: resolve => require(['@/view/HomePage.vue'], resolve),
    },
    {
      path: "/SearchPage",
      name: 'SearchPage',
      component: resolve => require(['@/view/SearchPage.vue'], resolve),
    },
    {
      path: "/CharacterDetail",
      name: 'CharacterDetail',
      component: resolve => require(['@/view/CharacterDetail.vue'], resolve),
    },
  ]
})

export default router;